-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove uses of Option<MarkerTree>
#5978
Conversation
@@ -3120,8 +3117,5 @@ fn satisfies_requires_python( | |||
/// Returns true if and only if the given requirement's marker expression has a | |||
/// possible true value given the `markers` expression given. | |||
fn possible_to_satisfy_markers(markers: &MarkerTree, requirement: &Requirement) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this changed, but also noticed that the invariant here is reversed. This should be fixed as part of #5562.
ccc14f8
to
7b5e4ec
Compare
7b5e4ec
to
26a8062
Compare
@@ -146,8 +140,8 @@ impl Lock { | |||
else { | |||
continue; | |||
}; | |||
let marker = edge.weight().as_ref(); | |||
locked_dist.add_dependency(dependency_dist, marker); | |||
let marker = edge.weight().clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to clone here in order to support unwrapping to default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to clone inside add_dependency
anyways. Also a MarkerTree
is just a usize
now, it could even implement Copy
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Yeah sorry saw that afterwards, they're all interned now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable to me.
Summary
Follow up to #5898. This should fix some of the failures in #5887 where
uv lock --locked
is failing due toSome(true)
andNone
markers not comparing equal.